<template>
	<ResourcePage ref="refPageController" page-name="系统配置日志" scene="userOperate" @get:list="getTableData">
		<template #columns>
			<el-table-column prop="username" label="操作账户" align="center" />
			<el-table-column prop="role_name" label="所属组织" align="center" />
			<el-table-column prop="ip" label="登录IP" align="center" />
			<el-table-column prop="object" label="操作对象" align="center" />
			<el-table-column prop="action" label="操作动作" align="center" />
			<el-table-column prop="remark" label="操作内容" align="center" />
			<el-table-column prop="create_time" label="记录时间" align="center" />
		</template>
	</ResourcePage>
</template>

<script setup>
import { ref } from 'vue'
import ResourcePage from '../components/ResourcePage.vue'
import { fetchLogsUserOperate } from '@/api/logs.services'
const refPageController = ref(null)

const getTableData = async (postData, { resolve }) => {
	const result = await fetchLogsUserOperate(postData)
	if (result.code == 1) {
		resolve({
			list: result.data.data,
			total: result.data.total
		})
	}
}
</script>
